package vcp.client.request.response;

import java.io.Serializable;
/**
 * <p> response request class </p>
 * @author VCP team
 *
 */
public class ResponseRequest implements Serializable
{

	/**
	 * 
	 */
	private static final long serialVersionUID = - 3162721031479531550L;

	private Serializable data;
	/**
	 * getter
	 * @return data
	 */
	public Serializable getData ()
	{
		return this.data;
	}
	/**
	 * setter
	 * @param data
	 */
	public void setData ( Serializable data )
	{
		this.data = data;
	}

	private final long responseID;
	/**
	 * getter
	 * @return response id
	 */
	public long getResponseID ()
	{
		return this.responseID;
	}
	/**
	 * getter
	 * @return true if data is not null
	 */
	public boolean isSucceded ()
	{
		return this.data != null;
	}

	public String errorMessage;
	/**
	 * getter
	 * @return error message
	 */
	public String getErrorMessage ()
	{
		return this.errorMessage;
	}
	/**
	 * setter
	 * @param errorMessage
	 */
	public void setErrorMessage ( String errorMessage )
	{
		this.errorMessage = errorMessage;
	}
	/**
	 * Constructor
	 * @param responseID
	 * @param data
	 */
	public ResponseRequest ( long responseID, Serializable data )
	{
		this.responseID = responseID;
		this.data = data;
	}

}
